﻿///<reference path="_moduleReferences.ts" />

module ScrambledEggs.Modules {
    export class Message implements IModule {

        private _onUpdate: () => void;

        constructor() {
        }

        initialize(gameState: GameStateProvider, onUpdate: () => void ) {
            this._onUpdate = onUpdate;
        }

        update(gameState: GameStateProvider, triggerSource: IModule): void {
            if (gameState.State.Message == null) {
                $("#message").hide();
            }
            else {
                $("#message").html(gameState.State.Message).show();
            }
        }        
    }
}